package com.example.jixeishi1.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
@Data

//商品
public class Product {
    int id;
    int categoryid;
    String name;
    String subtitle;
    String mainimage;
    String detail;
    double price;
    int stock;
    int status;
    String xinghaoname;
    Date createtime;
    String flname;

    public Product() {
    }

    public Product(int id, int categoryid, String name, String subtitle, String mainimage, String detail, double price, int stock, int status, String xinghaoname, Date createtime, String flname) {
        this.id = id;
        this.categoryid = categoryid;
        this.name = name;
        this.subtitle = subtitle;
        this.mainimage = mainimage;
        this.detail = detail;
        this.price = price;
        this.stock = stock;
        this.status = status;
        this.xinghaoname = xinghaoname;
        this.createtime = createtime;
        this.flname = flname;
    }

    public String getFlname() {
        return flname;
    }

    public void setFlname(String flname) {
        this.flname = flname;
    }

    public Product(int id, int categoryid, String name, String subtitle, String mainimage, String detail, double price, int stock, int status, String xinghaoname, Date createtime) {
        this.id = id;
        this.categoryid = categoryid;
        this.name = name;
        this.subtitle = subtitle;
        this.mainimage = mainimage;
        this.detail = detail;
        this.price = price;
        this.stock = stock;
        this.status = status;
        this.xinghaoname = xinghaoname;
        this.createtime = createtime;
    }

    public Product(int categoryid, String name, String subtitle, String mainimage, String detail, double price, int stock, int status, String xinghaoname, Date createtime) {
        this.categoryid = categoryid;
        this.name = name;
        this.subtitle = subtitle;
        this.mainimage = mainimage;
        this.detail = detail;
        this.price = price;
        this.stock = stock;
        this.status = status;
        this.xinghaoname = xinghaoname;
        this.createtime = createtime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCategoryid() {
        return categoryid;
    }

    public void setCategoryid(int categoryid) {
        this.categoryid = categoryid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public String getMainimage() {
        return mainimage;
    }

    public void setMainimage(String mainimage) {
        this.mainimage = mainimage;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getXinghaoname() {
        return xinghaoname;
    }

    public void setXinghaoname(String xinghaoname) {
        this.xinghaoname = xinghaoname;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Override
    public String toString() {
        return "\nProduct{" +
                "id=" + id +
                ", categoryid=" + categoryid +
                ", name='" + name + '\'' +
                ", subtitle='" + subtitle + '\'' +
                ", mainimage='" + mainimage + '\'' +
                ", detail='" + detail + '\'' +
                ", price=" + price +
                ", stock=" + stock +
                ", status=" + status +
                ", xinghaoname='" + xinghaoname + '\'' +
                ", createtime=" + createtime +
                '}';
    }
}
